package net.entelijan.cobean.examples.showcase.config;

import javax.swing.JPanel;
import javax.swing.JTabbedPane;

import net.entelijan.cobean.examples.showcase.config.combobox.ConfigBookAuthorComboPanel;
import net.entelijan.cobean.examples.showcase.config.filesel.ConfigFileselPanel;
import net.entelijan.cobean.examples.showcase.config.table.ConfigTablePanel;
import net.entelijan.cobean.examples.showcase.config.text.ConfigBookAuthorTextPanel;
import net.entelijan.cobean.examples.showcase.config.text.ConfigBookTextPanel;
import net.entelijan.cobean.examples.showcase.config.text.ConfigMultiFailureTextPanel;
import net.entelijan.cobean.examples.showcase.config.toggle.ConfigBookAuthorTogglePanel;
import net.entelijan.cobean.examples.showcase.config.toggle.ConfigBookTogglePanel;
import net.entelijan.cobean.examples.util.ExamplesUtil;
import net.miginfocom.swing.MigLayout;

public class CobeanConfigShowcasePanel extends JPanel {

	private ConfigBookTextPanel configBookTextPanel = new ConfigBookTextPanel();

	private ConfigBookAuthorTextPanel configBookAuthorTextPanel = new ConfigBookAuthorTextPanel();

	private ConfigMultiFailureTextPanel configMultiFailureTextPanel = new ConfigMultiFailureTextPanel();

	private ConfigBookTogglePanel configBookTogglePanel = new ConfigBookTogglePanel();

	private ConfigBookAuthorTogglePanel configBookAuthorTogglePanel = new ConfigBookAuthorTogglePanel();

	private ConfigBookAuthorComboPanel configBookAuthorComboPanel = new ConfigBookAuthorComboPanel();

	private ConfigFileselPanel configFileselPanel = new ConfigFileselPanel();
	
	private ConfigTablePanel configTablePanel = new ConfigTablePanel();

	private static final long serialVersionUID = 1L;

	public CobeanConfigShowcasePanel() {
		super();
		setLayout(new MigLayout());
		JTabbedPane tp = new JTabbedPane(JTabbedPane.LEFT);
		{
			JTabbedPane tabbed = new JTabbedPane(JTabbedPane.TOP);
			tabbed.add(configBookTextPanel, "Simple POJO");
			tabbed.add(configBookAuthorTextPanel, "Referenced POJO");
			tabbed.add(configMultiFailureTextPanel, "Multiple Failuere Fields");
			tp.add(tabbed, "Text");

		}
		{
			JTabbedPane tabbed = new JTabbedPane(JTabbedPane.TOP);
			tabbed.add(configBookTogglePanel, "Simple POJO");
			tabbed.add(configBookAuthorTogglePanel, "Referenced POJO");
			tp.add(tabbed, "Toggle");

		}
		{
			tp.add(configBookAuthorComboPanel, "Combobox");
		}
		{
			tp.add(configFileselPanel, "Fileselection");
		}
		{
			tp.add(configTablePanel, "Table");
		}
		add(ExamplesUtil.createIconLabel("showcase-bind.png"), "wrap");
		add(tp, "w max, h max");
	}

	public ConfigBookTextPanel getConfigBookTextPanel() {
		return configBookTextPanel;
	}

	public void setConfigBookTextPanel(ConfigBookTextPanel configBookTextPanel) {
		this.configBookTextPanel = configBookTextPanel;
	}

	public ConfigBookAuthorTextPanel getConfigBookAuthorTextPanel() {
		return configBookAuthorTextPanel;
	}

	public void setConfigBookAuthorTextPanel(
			ConfigBookAuthorTextPanel configBookAuthorTextPanel) {
		this.configBookAuthorTextPanel = configBookAuthorTextPanel;
	}

	public ConfigBookAuthorTogglePanel getConfigBookAuthorTogglePanel() {
		return configBookAuthorTogglePanel;
	}

	public void setConfigBookAuthorTogglePanel(
			ConfigBookAuthorTogglePanel configBookAuthorTogglePanel) {
		this.configBookAuthorTogglePanel = configBookAuthorTogglePanel;
	}

	public ConfigBookTogglePanel getConfigBookTogglePanel() {
		return configBookTogglePanel;
	}

	public void setConfigBookTogglePanel(
			ConfigBookTogglePanel configBookTogglePanel) {
		this.configBookTogglePanel = configBookTogglePanel;
	}

	public ConfigBookAuthorComboPanel getConfigBookAuthorComboPanel() {
		return configBookAuthorComboPanel;
	}

	public void setConfigBookAuthorComboPanel(
			ConfigBookAuthorComboPanel configBookAuthorComboPanel) {
		this.configBookAuthorComboPanel = configBookAuthorComboPanel;
	}

	public ConfigFileselPanel getConfigFileselPanel() {
		return configFileselPanel;
	}

	public void setConfigFileselPanel(ConfigFileselPanel configFileselPanel) {
		this.configFileselPanel = configFileselPanel;
	}

	public ConfigMultiFailureTextPanel getConfigMultiFailureTextPanel() {
		return configMultiFailureTextPanel;
	}

	public void setConfigMultiFailureTextPanel(
			ConfigMultiFailureTextPanel configMultiFailureTextPanel) {
		this.configMultiFailureTextPanel = configMultiFailureTextPanel;
	}

	public ConfigTablePanel getConfigTablePanel() {
		return configTablePanel;
	}

	public void setConfigTablePanel(ConfigTablePanel configTablePanel) {
		this.configTablePanel = configTablePanel;
	}

}
